<template>
	<div>
	<el-form ref="startEndPanel" :model="form" label-width="110px" label="right">
	 <el-form-item label="节点ID:">
	   <el-input v-model="form.id"></el-input>
	 </el-form-item>
	 <el-form-item label="节点名称:">
	   <el-input v-model="form.name"></el-input>
	 </el-form-item>
	 <el-form-item label="节点描述:">
	   <el-input v-model="form.documentation"></el-input>
	 </el-form-item>
	 <el-form-item label="监听器:">
	 		  <el-badge :value="executionListenerLength">
	 			<el-button size="small" @click="dialogName = 'executionListenerDialog'">编辑</el-button>
	 		  </el-badge>
	 </el-form-item>
	 <el-form-item v-if="this.showConfig.initiator" label="发起人:">
	   <el-input v-model="form.initiator"></el-input>
	 </el-form-item>
	 <el-form-item v-if="this.showConfig.formKey"  label="表单标识key:">
	   <el-input v-model="form.formKey"></el-input>
	 </el-form-item>
	</el-form>
	<executionListenerDialog
	v-if="dialogName === 'executionListenerDialog'"	
	:bpmnModel="bpmnModel"
	:element="element"
	@close="finishExecutionListener"
	></executionListenerDialog>
	</div>
</template>

<script>
	import {commonParse} from '../common/parseElement.js'
	import mixinPanel from '../mixins/mixinPanel.js'
	import mixinExecutionListener from '../mixins/mixinExecutionListener.js'
	export default{
		mixins:[mixinPanel,mixinExecutionListener],
		data(){
			return{
				form:{}
			}
		},
		created() {
			this.form = commonParse(this.element)
		},
		watch:{
			'form.initiator':function(val){
				if(val==='') val = null
				this.updateProperties({'flowable:initiator':val})
			},
			'form.formKey':function(val){
				if(val==='') val = null
				this.updateProperties({'flowable:formKey':val})
			}
		}
		
	}
</script>

<style  >
	label {
		font-weight: initial !important;
	}
</style>
